﻿using Abp.Authorization;
using AutoMapper;
using FutureApp.Roles.Dto;

namespace FutureApp.Roles.Mapper
{
    internal class PermissionProfile : Profile
    {
        public PermissionProfile()
        {
            this.CreateMap<Permission, PermissionEntityDto>()
                .ForMember(dest => dest.Code, opt => opt.MapFrom(src => src.Name))
                .ForMember(dest => dest.Name, opt => opt.MapFrom(src => src.DisplayName));
        }
    }
}
